home *** CD-ROM | disk | FTP | other *** search
- global oINTERfaceENTRYpush, oINTERfaceENCpush, oIndexScroller, gExtraSpeed, oINTERfaceEpis, oINTERfaceModes, oINTERfaceFind, oINTERfaceNext, oINTERfaceAlph, gDefaultENTRYstate, gDefaultENCstate, gDefaultSearchstate, gDefaultTextstate, gDefaultPixelstate, gSearchPopOut, gCloseHlt, gFlashPixel, gUpdateBase, vENCpushBaseCast, vENTRYpushBaseCast, gPullDownModes, gPullDownSearch, gFindBase, gAlphBase, gColorMac, gEpisBase, gModeBase, gComputerTypeK, gModeList, gHoldEntPixelSprite, gHoldEncPixelSprite, oINTERfaceUpdate, gCastVideoHlt, gCastAudioHlt, gCastResHlt, gBlankBar, gPixelHold, gHoldENCstate, gNextBase, gDefaultWordBar, gHoldSearchInfo, gTbarSND, gWhereIam, gResumeHlt, gQuitHlt, gTopicBase, oINTERfaceTopicControl, gTopIsPaused, oCHROPopup1, oCHROPopup2, gFTstartSND, gPrepareSND, gSpeechWasChosenF, gTheFTword, gModeState, gActiveResTopWin, gFTsearchscope, gSavedMouseUpScript, gthisisahack, gtheblackbar, oVidCD, gSearchState, gSavedMouseUpScriptforQuit, gModeList2, gOptionBaseCastMem, oINTERfaceOptions, gHltPixel, oINTERfaceAddArtical, oImportDeleteImport, oImportAddSameName, oImportOKorCancel, oImportSkipAppend, oImportDeleteORresume
-
- on hInterFace
- set gHoldSearchInfo to 0
- set gColorMac to the colorDepth
- hSetSpeed()
- set vFindBaseCastMem to the number of cast "FindBASE"
- set vNextBaseCastMem to the number of cast "NextBASE"
- set vAlphBaseCastMem to the number of cast "AlphBASE"
- set vEpisBaseCastMem to the number of cast "EpisBASE"
- set vModeBaseCastMem to the number of cast "ModeBASE"
- set gOptionBaseCastMem to the number of cast "Options Pop Out"
- set vTopicControlBaseCast to the number of cast "TopicControlBase"
- set gResumeHlt to the number of cast "resumeHlt"
- set gQuitHlt to the number of cast "quitHlt"
- set gDefaultENTRYstate to the number of cast "entryBASE"
- set gHoldENCstate to the number of cast "BlankBar"
- set gthisisahack to gDefaultENTRYstate
- set gDefaultWordBar to the number of cast "wordBASE"
- set gDefaultENCstate to the number of cast "BlankBar"
- set gtheblackbar to gDefaultENCstate
- set gDefaultSearchstate to the number of cast "searchBASE"
- set gDefaultTextstate to the number of cast "searchtextcandidate"
- set gDefaultPixelstate to the number of cast "PixelREF"
- set gCloseHlt to the number of cast "CloseHlt"
- set vENTRYpushBaseCast to the number of cast "ENTRYpulldownBASE"
- set gModeList to [#ENCY, #EPIS, #CHRO, #Resources, #TOPICS, #FoundSet, #EPISSUB]
- set gModeList2 to [#ENCY, #EPIS, #CHRO, #ALL]
- set gCastVideoHlt to the number of cast "video 1"
- set gCastAudioHlt to the number of cast "audio 1"
- set gCastResHlt to the number of cast "resource 1"
- set gBlankBar to the number of cast "BlankBar"
- set gPixelHold to the number of cast "PixelREF"
- set vUpdateBaseCastMem to the number of cast "FoundsetBase"
- set oINTERfaceUpdate to birth(script "Interface Hlt Script2", gUpdateBase, 2, vUpdateBaseCastMem, 156)
- if not objectp(oINTERfaceUpdate) then
- beep(4)
- end if
- set oINTERfaceFind to birth(script "Interface Hlt Script", gFindBase, 3, vFindBaseCastMem)
- if not objectp(oINTERfaceFind) then
- beep(4)
- end if
- set oINTERfaceNext to birth(script "Interface Hlt Script", gNextBase, 3, vNextBaseCastMem)
- if not objectp(oINTERfaceNext) then
- beep(4)
- end if
- set oINTERfaceAlph to birth(script "Interface Hlt Script2", gAlphBase, 26, vAlphBaseCastMem, 12)
- if not objectp(oINTERfaceAlph) then
- beep(4)
- end if
- set oINTERfaceEpis to birth(script "Interface Hlt Script2", gEpisBase, 6, vEpisBaseCastMem, 52)
- if not objectp(oINTERfaceEpis) then
- beep(4)
- end if
- set oINTERfaceOptions to birth(script "Interface Hlt Script", gPullDownModes, 2, gOptionBaseCastMem)
- if not objectp(oINTERfaceAlph) then
- beep(4)
- end if
- set oINTERfaceENTRYpush to birth(script "Interface Hlt Script", gPullDownSearch, 2, vENTRYpushBaseCast)
- if not objectp(oINTERfaceENTRYpush) then
- beep(4)
- end if
- set oINTERfaceTopicControl to birth(script "Interface Hlt Script", gTopicBase, 4, vTopicControlBaseCast)
- if not objectp(oINTERfaceTopicControl) then
- beep(4)
- end if
- end
-
- on hCallbirthforButtonsHere
- set oINTERfaceAddArtical to birth(script "Interface Hlt Script", 9, 3, the number of cast "ImportArtButtons")
- set oImportDeleteImport to birth(script "Interface Hlt Script", 14, 2, the number of cast "DeleteImportArtic")
- set oImportAddSameName to birth(script "Interface Hlt Script", 15, 3, the number of cast "ImportAddSameName")
- hReportStatus("Preparing interface parameters...")
- set oImportOKorCancel to birth(script "Interface Hlt Script", 16, 2, the number of cast "OK Cancel")
- set oImportSkipAppend to birth(script "Interface Hlt Script", 17, 2, the number of cast "SKIP&APPEND")
- set oImportDeleteORresume to birth(script "Interface Hlt Script", 19, 2, the number of cast "DeleteImportArtic")
- hReportStatus("Ready...")
- end
-
- on hcallfaceAddSameName
- global mouseUp, oImport
- set vResult to mHltVer(oImportAddSameName)
- if vResult = 1 then
- mSkipNewEntry(oImport)
- else
- if vResult = 2 then
- mReplaceSameName(oImport)
- else
- if vResult = 3 then
- mReNameNewTopic(oImport)
- end if
- end if
- end if
- end
-
- on hCallImportDeleteOkCancel
- global oImport, gDeleteLine
- set vResult to mHltVer(oImportOKorCancel)
- if vResult = 1 then
- mDeleteSingleEntry(oImport, gDeleteLine)
- set gDeleteLine to 0
- go("TopicDelete")
- else
- set gDeleteLine to 0
- go("TopicDelete")
- end if
- end
-
- on hCallImportOkCancel
- global oImport, gTopicNameField
- set vResult to mHltVer(oImportOKorCancel)
- if vResult = 1 then
- if the text of field gTopicNameField <> EMPTY then
- mEnterNewName(oImport)
- end if
- else
- if vResult = 2 then
- mCancelNewName(oImport)
- else
- end if
- end if
- end
-
- on hcalImportSkipAppend
- global oImport
- set vResult to mHltVer(oImportSkipAppend)
- if vResult = 1 then
- mSkipNewEntry(oImport)
- else
- if vResult = 2 then
- mReNameNewTopic(oImport)
- end if
- end if
- end
-
- on hCallDeleteArticalButs
- global oImport
- set vResult to mHltVer(oImportDeleteORresume)
- if vResult = 1 then
- mStartUserDelete(oImport)
- else
- if vResult = 2 then
- hLeaveTopicEdit()
- end if
- end if
- end
-
- on hCallAddArticleButs
- global gAddField, oImport
- set vResult to mHltVer(oINTERfaceAddArtical)
- if vResult = 1 then
- mStartUserImport(oImport)
- else
- if vResult = 2 then
- set the textStyle of field gAddField to "bold"
- else
- if vResult = 3 then
- hLeaveTopicEdit()
- end if
- end if
- end if
- end
-
- on hSetSpeed
- if gComputerTypeK = #mac then
- if gColorMac = 32 then
- set gExtraSpeed to 137
- else
- if gColorMac = 16 then
- set gExtraSpeed to 127
- else
- set gExtraSpeed to 97
- end if
- end if
- else
- set gExtraSpeed to 97
- end if
- end
-
- on hcallupdate
- set vResult to mHltHor(oINTERfaceUpdate, gHltPixel)
- hputmsg(">hCallUpdate> returns>" && vResult)
- if vResult = 1 then
- hShowTheUpdate(3)
- else
- if vResult = 2 then
- hearit(gFTstartSND)
- if not (gTheFTword starts "[") then
- hShowTheFoundHits(1, 1)
- else
- hShowTheFoundHits(1, 0)
- end if
- end if
- end if
- end
-
- on hCallFind
- set vResult to mHltVerWithOption(oINTERfaceFind, 1)
- if vResult = 1 then
- mPopSearchStrip(oINTERfaceFind)
- else
- if vResult = 2 then
- hGoHelp()
- else
- if vResult = 39 then
- if gModeState <> #TOPICS then
- hSwitchSpeech()
- else
- hReportStatus("Speech not available in Topics mode.")
- end if
- else
- if vResult = 49 then
- hPopOptions()
- else
- if vResult = 3 then
- hBolt()
- end if
- end if
- end if
- end if
- end if
- end
-
- on hPopOptions
- mSwitchHold(oINTERfaceOptions, 179, 92, gOptionBaseCastMem, gPullDownModes)
- repeat while the stillDown
- mSwitchHold(oINTERfaceOptions, 179, 92, gOptionBaseCastMem, gPullDownModes)
- if rollOver(gPullDownModes) then
- set vResult to mRollOverHorizontal(oINTERfaceOptions)
- if not voidp(vResult) then
- set vHoldResult to vResult
- end if
- next repeat
- end if
- set the castNum of sprite gFlashPixel to gPixelHold
- updateStage()
- set vHoldResult to EMPTY
- end repeat
- puppetSprite(gPullDownModes, 0)
- if vHoldResult = 1 then
- hGoTopicEdit()
- else
- if vHoldResult = 2 then
- hPrintEntry()
- end if
- end if
- end
-
- on hBolt
- set gWhereIam to the frame
- hHelpWinClose()
- hStoreLockWins()
- hStorePuppets()
- hStoreVisibles()
- if gModeState = #TOPICS then
- if string(the windowList) contains gActiveResTopWin then
- hCloseTopWin()
- forget(window gActiveResTopWin)
- end if
- set the visible of sprite gTopicBase to 0
- mClearTopHlt(oINTERfaceTopicControl)
- end if
- if gModeState = #Resources then
- hResetResMode()
- set gSavedMouseUpScript to the mouseUpScript
- set the mouseUpScript to EMPTY
- end if
- go("Later")
- hAnnounce("Please Confirm Alpha deact.")
- if gComputerTypeK = #WIN then
- hWinVoiceStartQuit()
- end if
- set gSavedMouseUpScriptforQuit to the keyDownScript
- set the keyDownScript to EMPTY
- end
-
- on hCallNext
- set vResult to mHltVer(oINTERfaceNext)
- if gModeState = #CHRO then
- hResetMediaButts()
- end if
- if vResult = 1 then
- hStepNext()
- end if
- if vResult = 2 then
- hStepPrev()
- end if
- if vResult = 3 then
- hBackTrack()
- end if
- end
-
- on hCallTopicControl
- set x to the mouseV
- set y to the mouseH
- set vResult to mHltTopVer(oINTERfaceTopicControl, 1)
- if vResult = 1 then
- hResumeTopWin()
- end if
- if vResult = 3 then
- hRewindTopWin()
- if gTopIsPaused then
- mForceTopHlt(oINTERfaceTopicControl, 4)
- else
- mForceTopHlt(oINTERfaceTopicControl, 1)
- end if
- end if
- if vResult = 4 then
- hPauseTopWin()
- end if
- end
-
- on hCallHltModes pWhat
- hputmsg("hCallHltModes to" && pWhat)
- if not (the puppet of sprite 40) then
- puppetSprite(40, 1)
- end if
- if not (the puppet of sprite 18) then
- puppetSprite(18, 1)
- end if
- if pWhat = #ENCY then
- set the castNum of sprite 40 to the number of cast "encyclopedia hilite"
- set the castNum of sprite 18 to the number of cast "foundentries base"
- updateStage()
- else
- if pWhat = #FoundSet then
- set the castNum of sprite 40 to the number of cast "encyclopedia base"
- set the castNum of sprite 18 to the number of cast "foundentries hilite"
- updateStage()
- else
- put "***!*** hCallHltModes cant work with" && pWhat
- end if
- end if
- end
-
- on hCallResume
- if the soundBusy of 1 then
- puppetSound(0)
- end if
- if gComputerTypeK = #WIN then
- hWinVoiceEndQuit()
- end if
- hSwitchCast(8, gResumeHlt, 8)
- if (gModeState <> #TOPICS) and (gModeState <> #Resources) then
- hAnnounce("Reastablishing Link")
- end if
- go(gWhereIam)
- hRestorePuppets()
- hRestoreVisibles()
- if (gModeState = #TOPICS) or (gModeState = #Resources) then
- hPlaceEntryRequest(0)
- set the mouseUpScript to gSavedMouseUpScript
- set gSavedMouseUpScript to EMPTY
- end if
- if gModeState <> #TOPICS then
- hRestoreLockWins()
- end if
- set the keyDownScript to gSavedMouseUpScriptforQuit
- end
-
- on hCallQuit
- hSwitchCast(9, gQuitHlt, 9)
- puppetSound("Deactivation Complete")
- go(label("SS Animation"))
- end
-
- on hCallHltHoriz pWhat
- mHltfromScriptsVer(oINTERfaceFind, pWhat)
- end
-
- on hCallHltNEXT pWhat
- mHltfromScriptsVer2(oINTERfaceNext, pWhat)
- end
-
- on hCallAlph
- hearit(gTbarSND)
- set vResult to mHltHor(oINTERfaceAlph, gHltPixel)
- mShiftWindowToItem(oIndexScroller, vResult)
- end
-
- on hKeyCallAlph
- hearit(gTbarSND)
- set vResult to mHltKeyHor(oINTERfaceAlph)
- mShiftWindowToItem(oIndexScroller, vResult)
- end
-
- on hCallEpis
- hearit(gTbarSND)
- set vResult to mHltHor(oINTERfaceEpis, gHltPixel)
- mSwitchtoEpisSubindex(oIndexScroller, vResult)
- end
-
- on hCallClear
- mLeaveMode(oCHROPopup1)
- mLeaveMode(oCHROPopup2)
- mLeaveMode(oINTERfaceAlph)
- mLeaveMode(oINTERfaceEpis)
- mLeaveMode(oINTERfaceUpdate)
- end
-
- on hCallClearPuppsAlph
- mLeaveMode(oINTERfaceAlph)
- end
-
- on hCallClearPuppsEpis
- mLeaveMode(oINTERfaceEpis)
- end
-
- on hCallClearPuppsUpdate
- mLeaveMode(oINTERfaceUpdate)
- end
-
- on hCallClosePopup
- set vWhereClick to getAt(the clickLoc, 1)
- if vWhereClick < 86 then
- hSwitchCast(gFlashPixel, gCloseHlt)
- set the castNum of sprite gFlashPixel to gPixelHold
- mPopSearchStrip(oINTERfaceFind)
- end if
- end
-
- on hCallSearch
- hSwitchCast(gFlashPixel, gDefaultSearchstate + 1)
- hSearchRequest()
- end
-
- on hCallResource pMySpr
- hSwitchCast(gFlashPixel, gCastResHlt, pMySpr)
- hShowResource()
- end
-
- on hCallAudio pMySpr
- hSwitchCast(gFlashPixel, gCastAudioHlt, pMySpr)
- hOpenAudio()
- end
-
- on hCallvideo pMySpr
- hSwitchCast(gFlashPixel, gCastVideoHlt, pMySpr)
- mSetCDNum(oVidCD, getAt(gcurrentmedialist, 3))
- if mVidCDisMounted(oVidCD) then
- hOpenVideo()
- else
- mRequestCDSwap(oVidCD, #video)
- end if
- end
-
- on hCallEntry
- mPushDown(oINTERfaceENTRYpush, 464, 81, 13 + gExtraSpeed)
- mSwitchHold(oINTERfaceENTRYpush, 464, 26, gDefaultENTRYstate, gHoldEntPixelSprite)
- if gDefaultENTRYstate = (vENTRYpushBaseCast + 3) then
- set gDefaultENCstate to gBlankBar
- else
- if gDefaultENTRYstate = (vENTRYpushBaseCast + 4) then
- set gDefaultENCstate to gHoldENCstate
- end if
- end if
- hputmsg(">hcallentry complete.")
- end
-
- on hUserSelectWord
- if gHoldSearchInfo = 1 then
- mSwitchHold(oINTERfaceENTRYpush, 464, 26, gDefaultWordBar, gHoldEntPixelSprite)
- else
- set gDefaultWordBar to gDefaultWordBar
- set gHoldENCstate to gHoldENCstate
- end if
- end
-
- on hUserGrabWord
- if gHoldSearchInfo = 1 then
- mSwitchHold(oINTERfaceENTRYpush, 464, 26, gDefaultWordBar, gHoldEntPixelSprite)
- if gModeState = #FoundSet then
- set vThisBar to getPos(gModeList2, gFTsearchscope)
- else
- set vThisBar to getPos(gModeList2, gModeState)
- end if
- if (vThisBar < 1) or (vThisBar > 4) then
- set vThisBar to 1
- end if
- set gHoldENCstate to vENCpushBaseCast + 4 + vThisBar
- hputmsg(">husergrabword just set gholdencstate to" && gHoldENCstate)
- else
- set gDefaultWordBar to gDefaultWordBar
- set gHoldENCstate to gHoldENCstate
- end if
- end
-
- on hUserSelectEntry
- if gHoldSearchInfo = 1 then
- set gSearchState to #ENTRY
- set gDefaultENTRYstate to gthisisahack
- mSwitchHold(oINTERfaceENTRYpush, 464, 26, gDefaultENTRYstate, gHoldEntPixelSprite)
- set gDefaultENCstate to gBlankBar
- else
- set gDefaultENTRYstate to gDefaultENTRYstate
- set gDefaultENCstate to gBlankBar
- set gDefaultENCstate to gDefaultENCstate
- end if
- end
-
- on hSwitchCast whichsprite, vwhom, pMySpr
- if voidp(pMySpr) then
- set vClick to the clickOn
- else
- set vClick to pMySpr
- end if
- puppetSprite(whichsprite, 1)
- set the locV of sprite whichsprite to the top of sprite vClick
- set the locH of sprite whichsprite to the left of sprite vClick
- set the castNum of sprite whichsprite to vwhom
- updateStage()
- repeat while the stillDown
- nothing()
- end repeat
- puppetSprite(whichsprite, 0)
- updateStage()
- end
-
- on hmoderoll psprnum
- puppetSprite(psprnum, 1)
- set Lme to the castNum of sprite psprnum
- repeat while the stillDown
- set the castNum of sprite psprnum to the castNum of sprite psprnum + rollOver(psprnum)
- updateStage()
- set the castNum of sprite psprnum to Lme
- end repeat
- if rollOver(psprnum) = 0 then
- return
- end if
- updateStage()
- puppetSprite(psprnum, 0)
- hputmsg("hmoderoll decides whether to call hcallmodes")
- if psprnum = 40 then
- hCallModes(1)
- else
- if psprnum = 18 then
- hCallModes(6)
- end if
- end if
- end
-
- on hHelpmoderoll psprnum
- if psprnum = 40 then
- if not (the puppet of sprite 40) then
- puppetSprite(40, 1)
- end if
- set the castNum of sprite 18 to the number of cast "foundentries base"
- else
- if not (the puppet of sprite 18) then
- puppetSprite(18, 1)
- end if
- set the castNum of sprite 40 to the number of cast "encyclopedia base"
- end if
- set the castNum of sprite psprnum to the castNum of sprite psprnum + 1
- updateStage()
- end
-
- on hCallModes pResult
- if voidp(pResult) then
- set pResult to mHltModes(oINTERfaceModes)
- end if
- hputmsg(">hCallModes> returns>" && pResult)
- if pResult = 1 then
- hSetMode(#ENCY)
- hRecall(gModeState)
- else
- if pResult = 6 then
- hSetMode(#FoundSet)
- hRecall(gModeState)
- end if
- end if
- end
-